import { App } from "vue"
import { ElMessage, ElNotification, ElMessageBox } from "element-plus"
// 默认⾃动导⼊组件插件，只会解析在模板中使⽤的组件，所以这⾥需要导⼊样式
// 这⾥的样式也可以做到按需导⼊
// import "element-plus/theme-chalk/el-message.css"
// import "element-plus/theme-chalk/el-notification.css"
// import "element-plus/theme-chalk/el-message-box.css"

export default (app: App): void => {
  // 按需导⼊组件列表
  app.config.globalProperties.$message = ElMessage
  app.config.globalProperties.$notify = ElNotification
  app.config.globalProperties.$confirm = ElMessageBox.confirm
  app.config.globalProperties.$alert = ElMessageBox.alert
  app.config.globalProperties.$prompt = ElMessageBox.prompt
}
